from xml.etree import ElementTree



class XML_utils_cls:
    def __init__(self, xml_text):
        self.tree = ElementTree.XML(xml_text)

    # def red_xml_text(self, xml_text):
    #     self.tree = ElementTree.XML(xml_text)
    #     return self.tree

    def iter_func(self, tag):
        nodes = self.tree.iter(tag)
        for node in nodes:
            return node.tag, node.text


# if __name__ == '__main__':

    # XMLutilsCls = XML_utils_cls(xml_data)
    # BIPCode_tag, BIPCode_value = XMLutilsCls.iter_func('BIPCode')
    # ActivityCode_tag, ActivityCode_value = XMLutilsCls.iter_func('ActivityCode')
    # print tag, value


